//
//  MessageCell.m
//  e律师
//
//  Created by 韦淋 on 2017/5/16.
//  Copyright © 2017年 test. All rights reserved.
//

#import "MessageCell.h"

@implementation MessageCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initalizeInterface];
    }
    return self;
}
- (void)initalizeInterface{
    [self.contentView addSubview:self.titleLable];
    [self.contentView addSubview:self.contentLable];
    [self.contentView addSubview:self.dateLable];
}
- (void)layoutSubviews{
    
    self.titleLable.frame = CGRectMake(5, 0, 300, 50);
    self.contentLable.frame = CGRectMake(5, 50, 350, 20);
    self.dateLable.frame = CGRectMake(250, 80, 60, 20);
}

- (UILabel *)titleLable{
    if (!_titleLable) {
        _titleLable = [[UILabel alloc]init];
        _titleLable.textColor = [UIColor whiteColor];
        _titleLable.font = [UIFont systemFontOfSize:15];
    }
    return _titleLable;
}
- (UILabel *)contentLable{
    if (!_contentLable) {
        _contentLable = [[UILabel alloc]init];
        _contentLable.textColor = [UIColor whiteColor];
        _contentLable.font = [UIFont systemFontOfSize:11];
        _contentLable.numberOfLines = 2;
        _contentLable.lineBreakMode = NSLineBreakByTruncatingTail;
        //        _sTitleLable.backgroundColor = [UIColor redColor];
    }
    return _contentLable;
}
- (UILabel *)dateLable{
    if (!_dateLable) {
        _dateLable = [[UILabel alloc]init];
        _dateLable.textColor = [UIColor whiteColor];
        _dateLable.font = [UIFont systemFontOfSize:10];
        _dateLable.textAlignment = NSTextAlignmentCenter;
    }
    return _dateLable;
}

@end
